package com.springboot.cms.broadside.service.impl;

import com.springboot.cms.broadside.domain.CmsCustomer;
import com.springboot.cms.broadside.mapper.CmsCustomerMapper;
import com.springboot.cms.broadside.service.ICmsCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 站长信息Service业务层处理
 *
 * @author lhxz
 * @date 2024-07-09
 */
@Service
public class CmsCustomerServiceImpl implements ICmsCustomerService
{
    @Autowired
    private CmsCustomerMapper cmsCustomerMapper;

    /**
     * 查询站长信息
     *
     * @param id 站长信息主键
     * @return 站长信息
     */
    @Override
    public CmsCustomer selectCmsCustomerById(Long id)
    {
        return cmsCustomerMapper.selectCmsCustomerById(id);
    }

    /**
     * 查询站长信息列表
     *
     * @param cmsCustomer 站长信息
     * @return 站长信息
     */
    @Override
    public List<CmsCustomer> selectCmsCustomerList(CmsCustomer cmsCustomer)
    {
        return cmsCustomerMapper.selectCmsCustomerList(cmsCustomer);
    }

    /**
     * 新增站长信息
     *
     * @param cmsCustomer 站长信息
     * @return 结果
     */
    @Override
    public int insertCmsCustomer(CmsCustomer cmsCustomer)
    {
        return cmsCustomerMapper.insertCmsCustomer(cmsCustomer);
    }

    /**
     * 修改站长信息
     *
     * @param cmsCustomer 站长信息
     * @return 结果
     */
    @Override
    public int updateCmsCustomer(CmsCustomer cmsCustomer)
    {
        return cmsCustomerMapper.updateCmsCustomer(cmsCustomer);
    }

    /**
     * 批量删除站长信息
     *
     * @param ids 需要删除的站长信息主键
     * @return 结果
     */
    @Override
    public int deleteCmsCustomerByIds(Long[] ids)
    {
        return cmsCustomerMapper.deleteCmsCustomerByIds(ids);
    }

    /**
     * 删除站长信息信息
     *
     * @param id 站长信息主键
     * @return 结果
     */
    @Override
    public int deleteCmsCustomerById(Long id)
    {
        return cmsCustomerMapper.deleteCmsCustomerById(id);
    }
}
